<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<header th:replace="admin/header::header-fragment">
</header>
<style>
    .ui-jqgrid tr.jqgrow td {
        white-space: normal !important;
        height: auto;
        vertical-align: text-top;
        padding-top: 2px;
    }

    a {
        color: #1baeae;
        text-decoration: none;
        background-color: transparent;
        -webkit-text-decoration-skip: objects;
    }

    a:hover {
        color: white;
        background-color: #1baeae;
    }
</style>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
    <!-- 引入页面头header-fragment -->
    <div th:replace="admin/header::header-nav"></div>
    <!-- 引入工具栏sidebar-fragment -->
    <div th:replace="admin/sidebar::sidebar-fragment(${path})"></div>
    <!-- Content Wrapper. Contains 图标content -->
    <div class="content-wrapper">
        <!-- Content Header (图标header) -->
        <div class="content-header">
            <div class="container-fluid">
            </div><!-- /.container-fluid -->
        </div>
        <!-- Main content -->
        <div class="content">
            <div class="container-fluid">
                <div class="card card-primary card-outline">
                    <div class="card-header">
                        <h3 class="card-title">商品管理</h3>
                    </div> <!-- /.card-body -->

                    <!-- search-content -->
                    <div class="row" style="margin-left: 20px">
                        <form class="form-inline" id="search-form" action="javascript:;">
                            <div class="form-group">
                                <label class="">商品id</label>
                                <input type="text" class="form-control" id="goodsId">
                            </div>
                            <div class="form-group">
                                <label class="">商品名称</label>
                                <input type="text" class="form-control" id="goodsName">
                            </div>
                            <!--                            <div class="form-group">-->
                            <!--                                <label class="m-l">商品简介</label>-->
                            <!--                                <input type="text" class="form-control" id="goodsIntro">-->
                            <!--                            </div>-->
                            <div class="form-group">
                                <label class="m-l">上架状态</label>
                                <select class="form-control" id="goodsSellStatus">
                                    <option value="" selected>全部</option>
                                    <option value=2>上架</option>
                                    <option value=1>下架</option>
                                </select>
                            </div>
                            <button type="button" class="btn btn-success m-l" onclick="reload()">搜索</button>
                            <button type="button" class="btn btn-info m-l"
                                    onclick="javascrip:$('#search-form')[0].reset();">重置
                            </button>
                        </form>
                    </div>
                    <!-- /search-content -->


                    <div class="card-body">
                        <div class="grid-btn">
                            <button class="btn btn-info" onclick="addGoods()"><i
                                    class="fa fa-plus"></i>&nbsp;添加商品
                            </button>
                            <button class="btn btn-info" onclick="editGoods()"><i
                                    class="fa fa-pencil-square-o"></i>&nbsp;修改商品
                            </button>
                            <button class="btn btn-success" onclick="putUpGoods()"><i
                                    class="fa fa-arrow-up"></i>&nbsp;上架商品
                            </button>
                            <button class="btn btn-danger" onclick="putDownGoods()"><i
                                    class="fa fa-arrow-down"></i>&nbsp;下架商品
                            </button>
                            <button class="btn btn-file">
                                <a th:href="@{/admin/goods/download}">
                                    <i class="fa fa-download"></i>&nbsp;
                                    下载全部商品excel
                                </a>
                            </button>
                        </div>
                        <table id="jqGrid" class="table table-bordered">
                        </table>
                        <div id="jqGridPager"></div>
                    </div><!-- /.card-body -->
                </div>
            </div><!-- /.container-fluid -->
        </div>
    </div>
    <!-- /.content-wrapper -->
    <!-- 引入页脚footer-fragment -->
    <div th:replace="admin/footer::footer-fragment"></div>
</div>
<!-- jQuery -->
<script th:src="@{/admin/plugins/jquery/jquery.min.js}"></script>
<!-- jQuery UI 1.11.4 -->
<script th:src="@{/admin/plugins/jQueryUI/jquery-ui.min.js}"></script>
<!-- Bootstrap 4 -->
<script th:src="@{/admin/plugins/bootstrap/js/bootstrap.bundle.min.js}"></script>
<!-- AdminLTE App -->
<script th:src="@{/admin/dist/js/adminlte.min.js}"></script>
<!-- jqgrid -->
<script th:src="@{/admin/plugins/jqgrid-5.3.0/jquery.jqGrid.min.js}"></script>
<script th:src="@{/admin/plugins/jqgrid-5.3.0/grid.locale-cn.js}"></script>
<script th:src="@{/admin/plugins/jqgrid-5.3.0/grid.locale-cn.js}"></script>
<!-- sweetalert -->
<script th:src="@{/admin/plugins/sweetalert/sweetalert.min.js}"></script>
<script th:src="@{/admin/dist/js/public.js}"></script>
<script th:src="@{/admin/dist/js/goods.js}"></script>
</body>
</html>
